The Memory Manager provides a routine for copying blocks of memory referenced by pointers. To copy a block of memory to a nonrelocatable block, you can use the BlockMove procedure.
To copy a sequence of bytes from one location in memory to another, you can use the BlockMove procedure.
PROCEDURE BlockMove (sourcePtr, destPtr: Ptr; byteCount: Size);
The BlockMove procedure moves a block of byteCount consecutive bytes from the address designated by sourcePtr to that designated by destPtr . It updates no pointers.
The BlockMove procedure works correctly even if the source and destination blocks overlap.
You can safely call BlockMove at interrupt time. Even though it moves memory, BlockMove does not move relocatable blocks, but simply copies bytes.
The BlockMove procedure currently flushes the processor caches whenever the number of bytes to be moved is greater than 12. This behavior can adversely affect your application's performance. You might want to avoid calling BlockMove to move small amounts of data in memory if there is no possibility of moving stale data or instructions. For more information about stale data and instructions, see the discussion of the processor caches in the chapter "Memory Management Utilities" in this book.